Search on blog:

Python: problem to install gattlib on Linux Mint and Ubuntu [GB]

It has problem because GCC tries to include boost-python36.a (or boost-python37.a) but system has only boost-python3-py36.a (or boost-python3-py37.a)

You can check it using

locate boost-python3

or using find.

(First you may have to install apt install boost-python-dev)

Edit setup.py on Ubuntu 18.04 and Linux Mint 19.3 and put

if sys.version_info.major == 3:
    boost_libs = ["boost_python3-py36"]

or

if sys.version_info.major == 3:
    boost_libs = ["boost_python3-py3"+str(sys.version_info.minor)]

instead of

if sys.version_info.major == 3:
    boost_libs = ["boost_python3"+str(sys.version_info.minor)]

If it has problem with boost-thread then you may have to install apt install boost-thread-dev.

=============================== https://stackoverflow.com/questions/60152996/unable-to-install-gattlib/60155549#60155549

I run

sudo python3 setup.py install

and I also get error

usr/bin/ld: cannot find -lboost-python36

because I don't have boost-python36.a but boost-python3-py36.a.

(I found it using locate boost-python3 which uses database with filenames so it works faster then find but it may not be installed as default)

I had to edit setup.py and change

boost_libs = ["boost_python3"+str(sys.version_info.minor)]

to

boost_libs = ["boost_python3-py36"]

or more universal

boost_libs = ["boost_python3-py3"+str(sys.version_info.minor)]

Tested od Linux Mint 19.3 Tricia based on Ubuntu 18.04

If you like it
Buy a Coffee